package com.sh.data.engine.application.model.dto.integration;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author: mengzheng.mhc
 * @date: 2024/6/27 14:03
 */
@Data
@Builder
@Schema(description = "接口采集-http任务列表")
@NoArgsConstructor
@AllArgsConstructor
public class TaskItemDTO {

    @Schema(description = "任务id")
    private Long id;

    @Schema(description = "任务名称")
    private String taskName;

    @Schema(description = "接口地址")
    private String url;

    @Schema(description = "请求方式")
    private String httpRequestMethod;

    @Schema(description = "存储表")
    private String storageTable;

    @Schema(title = "任务状态", description = "0待发布 1失败 2成功")
    private Integer taskStatus;

    @Schema(description = "task开始日期", requiredMode = Schema.RequiredMode.REQUIRED)
    private Date startTime;

    /*生效结束时间*/
    @Schema(description = "task结束日期", requiredMode = Schema.RequiredMode.REQUIRED)
    private Date endTime;

    /*调度周期 0-月 1-周 2-天 3-小时 4-分钟*/
    @Schema(description = "调度周期 0-月 1-周 2-天 3-小时 4-分钟", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer cycle;

    @Schema(description = "创建人")
    private String createBy;
}
